<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="simpletourDevops">
		<meta name="author" content="www.roddypy.com">

		<link rel="shortcut icon" href="/static/assets/images/favicon_1.ico">

		<title>SimpletourDevops</title>

		<link href="/static/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/core.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/components.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/pages.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/responsive.css" rel="stylesheet" type="text/css" />
		<link href="/static/assets/plugins/sweetalert/dist/sweetalert.css" rel="stylesheet" type="text/css">

        <!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        <script src="/static/assets/js/modernizr.min.js"></script>

	</head>
	<body>
		<div class="account-pages"></div>
		<div class="clearfix"></div>
		<div class="wrapper-page">
			<div class=" card-box">
				<div class="panel-heading">
					<h3 class="text-center"> Simpletour <strong class="text-custom">Devops</strong> </h3>
				</div>

				<div class="panel-body">
					<form class="form-horizontal m-t-20"  role="form" >

						{% csrf_token  %}

						<div class="form-group ">
							<div class="col-xs-12">
								{{ data.password1}}
								{{ data.password1.errors}}
							</div>
						</div>

						<div class="form-group">
							<div class="col-xs-12">
								{{ data.password2}}
								{{ data.password2.errors}}
							</div>
						</div>

						<div class="form-group text-center m-t-40">
							<div class="col-xs-12">
								<button class="btn btn-pink btn-block text-uppercase waves-effect waves-light"  type="submit">
									确认重置
								</button>
							</div>
						</div>
						<a class="btn btn-pink btn-block text-uppercase waves-effect waves-light" href="{% url 'SendResetEmail' %}" >重发邮件<a>
					</form>
				</div>
			</div>
		</div>


		<script>
			var resizefunc = [];
		</script>


		<!-- jQuery  -->
        <script src="/static/assets/js/jquery.min.js"></script>
        <script src="/static/assets/js/bootstrap.min.js"></script>
        <script src="/static/assets/js/detect.js"></script>
        <script src="/static/assets/js/fastclick.js"></script>
        <script src="/static/assets/js/jquery.slimscroll.js"></script>
        <script src="/static/assets/js/jquery.blockUI.js"></script>
        <script src="/static/assets/js/waves.js"></script>
        <script src="/static/assets/js/wow.min.js"></script>
        <script src="/static/assets/js/jquery.nicescroll.js"></script>
        <script src="/static/assets/js/jquery.scrollTo.min.js"></script>

		<script src="/static/assets/plugins/notifyjs/dist/notify.min.js"></script>
        <script src="/static/assets/plugins/notifications/notify-metro.js"></script>


        <script src="/static/assets/js/jquery.core.js"></script>
        <script src="/static/assets/js/jquery.app.js"></script>
	    <script src="/static/assets/plugins/sweetalert/dist/sweetalert.min.js"></script>
	    <script src="/static/assets/pages/jquery.sweet-alert.init.js"></script>

		<script>
			jQuery(document).ready(function(){
				  $('button[type=submit]').click(function(e) {
						e.preventDefault();
						$.ajax({
							type: "post",
							dataType:'json',
							data:$('.form-horizontal').serialize(),
							url: "{% url 'ResetPassword' token%}",
							success: function(result){
								 var msgerror=result.msgerror;
								 var msginfo=result.msginfo;

								 if(msgerror){
									 $.Notification.autoHideNotify('error', 'top right', '系统通知',msgerror);
								 }else{
								 	 $.Notification.autoHideNotify('success','top right','系统通知',msginfo );
								     setTimeout(function() {
												location.href = '{% url 'Login' %}';
									 },2500);
								 }
							},
						});
				   });
			  });



		</script>

	</body>
</html>